#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

template< int L, class T = int, class LT = long long >
class  FFT
{
public : 
    FFT( ) { n = -1; }
    void fft( T e[], int &m, int minL )
    {
        in( e, m, minL );
        m = n;
        fft( );
        out( e );
    }
    void ifft( T e[], int &m, int minL )
    {
        in( e, m, minL );
        m = n;
        ifft( );
        out( e );
    }
    T getP( ) { return p; }
private : 
    int isPrime( T x )
    {
        T i; if ( x < 2 ) return 0;
        /* overflow !! */
        for ( i = 2; ( LT )i * i <= x; ++i ) if ( x % i == 0 ) return 0;
        return 1;
    }
    T powMod( T a, T b, T c )
    {
        T ans = 1; a %= c;
        while ( b > 0 )
        {
            if ( b & 1 ) ans = ( ( LT )ans * a ) % c;
            a = ( ( LT )a * a ) % c;
            b >>= 1;
        }
        return ans;
    }
    /* p is a prime number */
    int isG( T g, T p )
    {
        T p0 = p - 1, i;
        for ( i = 1; ( LT )i * i <= p0; ++i )
        {
            if ( p0 % i == 0 )
            {
                if ( ( powMod( g, i, p ) == 1 ) && ( i < p0 ) ) return 0;
                if ( ( powMod( g, p0 / i, p ) == 1 ) && ( p0 / i < p0 ) ) return 0;
            }
        }
        return 1;
    }
    int rev_bit( int i )
    {
        int j = 0, k;
        for ( k = 0; k < bit; ++k ) { j = ( ( j << 1 ) | ( i & 1 ) ); i >>= 1; }
        return j;
    }
    void reverse( )
    {
        int i, j;
        T t;
        for ( i = 0; i < n; ++i )
        {
            j = rev_bit( i );
            if ( i < j ) { t = a[ i ]; a[ i ] = a[ j ]; a[ j ] = t; }
        }
    }
    void in( T e[], int m, int minL )
    {
        int i, need = 0;
        bit = 0;
        while ( ( 1 << ( ++bit ) ) < minL ) ;
        if ( n != ( 1 << bit ) ) { need = 1; n = ( 1 << bit ); }
        for ( i = 0; i < m; ++i ) a[ i ] = e[ i ];
        for ( i = m; i < n; ++i ) a[ i ] = 0;
        if ( need ) init( 21, 10000000 );
    }
    // lim2 >= bit
    void init( int lim2, T minP )
    {
        T k = 2, ig = 2;
        int i;
        do {
            ++k;
            p = ( ( k << lim2 ) | 1 );
        } while ( ( p < minP ) || ( !isPrime( p ) ) );
        while ( !isG( ig, p ) ) ++ig;
        for ( i = 0; i < bit; ++i ) g[ i ] = powMod( ig, ( k << ( lim2 - bit + i ) ), p );
    }
    void fft( )
    {
        T w, wm, u, t;
        int s, m, m2, j, k;
        reverse( );
        for ( s = bit - 1; s >= 0; --s )
        {
            m2 = ( 1 << ( bit - s ) ); m = ( m2 >> 1 ); wm = g[ s ];
            for ( k = 0; k < n; k += m2 )
            {
                w = 1;
                for ( j = 0; j < m; ++j )
                {
                    t = ( ( LT )( w ) ) * a[ k + j + m ] % p;
                    u = a[ k + j ];
                    a[ k + j ] = ( u + t ) % p;
                    a[ k + j + m ] = ( u + p - t ) % p;
                    w = ( ( ( LT ) w ) * wm ) % p;
                }
            }
        }
    }
    void ifft( )
    {
        T w, wm, u, t, inv;
        int s, m, m2, j, k;
        reverse( );
        for ( s = bit - 1; s >= 0; --s )
        {
            m2 = ( 1 << ( bit - s ) );
            m = ( m2 >> 1 );
            wm = powMod( g[ s ], p - 2, p );
            for ( k = 0; k < n; k += m2 )
            {
                w = 1;
                for ( j = 0; j < m; ++j )
                {
                    t = ( ( LT )( w ) ) * a[ k + j + m ] % p;
                    u = a[ k + j ];
                    a[ k + j ] = ( u + t ) % p;
                    a[ k + j + m ] = ( u + p - t ) % p;
                    w = ( ( ( LT ) w ) * wm ) % p;
                }
            }
        }
        inv = powMod( n, p - 2, p );
        for ( k = 0; k < n; ++k ) a[ k ] = ( ( ( LT )inv ) * a[ k ] ) % p;
    }
    void out( T e[] ) { for ( int i = 0; i < n; ++i ) e[ i ] = a[ i ]; }

    T a[ L ], g[ 100 ], p;
    int n, bit;
};





#define  L  140000
typedef  long long Lint;

FFT< L, int, Lint > fft;
char s[ L ];

void bi_out( int a[] )
{
    int i, n;
    n = a[ 0 ];
    for ( i = 0; i < n; ++i ) s[ i ] = '0' + a[ n - i ];
    s[ n ] = 0;
    puts( s );
}

int bi_in( int a[] )
{
    int i, n;
    if ( scanf( "%s", s ) != 1 ) return 0;
    a[ 0 ] = n = strlen( s );
    for ( i = 0; i < n; ++i ) a[ n - i ] = s[ i ] - '0';
    return 1;
}

void bi_mul( int c[], int a[], int b[] )
{
    int m, n, p, g, i;

    n = ( ( a[ 0 ] > b[ 0 ] ) ? a[ 0 ] : b[ 0 ] );
    n <<= 1;

    m = a[ 0 ];
    fft.fft( a + 1, m, n );

    m = b[ 0 ];
    fft.fft( b + 1, m, n );

    p = fft.getP( );

    for ( i = 1; i <= m; ++i ) {
        c[ i ] = ( Lint )a[ i ] * b[ i ] % p;
    }
    fft.ifft( c + 1, m, m );
    g = 0;
    for ( i = 1; i <= m; ++i )
    {
        g += c[ i ];
        c[ i ] = g % 10;
        g /= 10;
    }
    for ( i = a[ 0 ] + b[ 0 ]; ( i > 1 ) && ( c[ i ] == 0 ); --i ) ;
    c[ 0 ] = i;
}

int a[ L ], b[ L ], c[ L ];

int main( )
{
    while ( bi_in( a ) && bi_in( b ) )
    {
        bi_mul( c, a, b );
        bi_out( c );
    }
    return 0;
}
